<%-- 
    Document   : tarikh_penerbangan
    Created on : Nov 1, 2012, 6:58:36 AM
    Author     : fikri
--%>
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@page contentType="text/html" pageEncoding="windows-1252"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>.: THIS :.</title>        
        <script type="text/javascript">
            $(document).ready(function(){
                var DELIM = "__^$__";              
                $('.disabled').hide();
                
                $('#semak').click(function(){
                    var val = $('#hijrah').val();
                    if (val == '') {
                        alert('Sila masukkan tahun hijrah');
                        return;
                    }
                    $.ajax({
                        url : '${pageContext.request.contextPath}/admin?searchJadual',
                        data : {
                            hijrah: val
                        },                            
                        success: function( data ) {                                 
                            var p =  data.split(DELIM);  
                            $('#masihi').val(p[0]);
                            $('#mula').val(p[1]);
                            $('#tamat').val(p[2]);                             
                            $('.disabled').show();
                        }
                    });
                });
                
            });
        </script>
    </head>
    <body>
        <s:form beanclass="th.stripes.action.AdminAction" class="niceform">
            <div id="content">
                <div id="logo">
                    <span>
                        <img src="${pageContext.request.contextPath}/images/img/ribbon.png"/>               
                    </span>
                </div>
                <h3>
                    Tarikh Penerbangan
                </h3>            
                <p>
                    <label>Tahun Hijrah :</label>
                    <s:text name="jadual.tahunHijrah" maxlength="4" size="10" id="hijrah"/>
                    <s:button name="semak" value="Semak" id="semak"/>
                </p>
                <p class="disabled">
                    <label>Tahun Masihi :</label>
                    <s:text name="jadual.tahunMasihi" maxlength="4" size="10" id="masihi"/>
                </p>
                <p class="disabled">
                    <label>Trh Mula Penerbangan :</label>
                    <s:text name="jadual.trhMula" class="date" size="20" id="mula"/>                    
                </p>
                <p class="disabled">
                    <label>Trh Tamat Penerbangan :</label>
                    <s:text name="jadual.trhTamat" class="date" size="20" id="tamat"/>
                </p>
                <p class="disabled">
                    <label>&nbsp;</label>
                    <s:submit name="saveJadualPenerbangan" value="Simpan" class="button green"/>
                </p>            
            </div>
        </s:form>       
    </body>
</html>
